package meituan;

import java.util.Scanner;

/**
 * @program: datastructureandalogorithm
 * @description:
 * @author: hmx
 * @create: 2021-11-08 11:13
 **/
public class MeiTuan001 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        String regex = "^([a-zA-Z]+)([0-9]+)([a-zA-Z0-9]*)$";
        sc.nextLine();
        while (t-- > 0) {
            String s = sc.nextLine();
            // 检查并输出
            System.out.println(s.matches(regex) ? "Accept" : "Wrong");
        }
    }

}
